package com.charger.fault.controller;

import com.charger.common.core.controller.BaseController;
import com.charger.common.core.page.TableDataInfo;
import com.charger.fault.domain.Fault;
import com.charger.fault.service.IFaultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;


import java.util.List;

/**
 * 故障管理Controller
 *
 * @author xuan
 * @date 2024-11-22
 */
@RestController
@RequestMapping("/charger/fault")
public class FaultController extends BaseController {
    @Autowired
    private IFaultService failureService;
    /**
     * 查询故障管理列表
     */
    @PreAuthorize("@ss.hasPermi('charger:fault:list')")
    @GetMapping("/list")
    public TableDataInfo list(Fault fault) {
        startPage();
        List<Fault> list = failureService.selectFailureList(fault);

        return getDataTable(list);
    }


}
